package com.bxx.ermall.mapper;

import com.bxx.ermall.common.dto.OrderDto;
import com.bxx.ermall.entity.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author buxiaoxing
 * @since 2021-02-02
 */
public interface OrderMapper extends BaseMapper<Order> {

    @Select("select `order`.*, `goods`.title, `goods`.cover_img, `store`.`name` from `order`,goods,store where `order`.goods_id = goods.id and `order`.address = store.id")
    List<OrderDto> orderList();
}
